import { defineComponent } from "vue";
import Child from "./Child.jsx";
export default defineComponent({
  setup(props,ctx) {
    function handleAdd() {
      console.log('点击事件----')
    }
    return () => (
      <Child
        onClick={handleAdd}
        onHandle={handleAdd}
        v-slots={{
          prefix: () => <i>prefix</i>, // 具名插槽
          suffix: (props) => <span>{props.name}</span>, // props可作插槽作用域的作用
        }}
      >
        默认插槽内容
        <button onClick={() => {ctx.emit("handle")}}>点击app</button>
      </Child>
    );
  },
});
